@Antony The easiest method is to just use subprocess function to call the command from within your python code. I think many people will just add the the command to their /etc/rc.local so the pin is set to gpio when the device boots.